import Cookies from 'js-cookie'
// Cookies 和localStrage差不多

const TokenKey = 'vue_admin_template_token'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}


const userKey='UserMsg'
// 获取个人信息
export function getUserMsg() {
  return Cookies.get(userKey)
}
// 设置个人信息
export function setUserMsg(msg) {
  return Cookies.set(userKey,msg)
}
// 清除个人信息
export function removeUserMsg() {
  return Cookies.remove(userKey)
}
